load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_doc_test", "rust_library")

package(default_visibility = [
    # Keep sorted.
    "//rs/nns/test_utils:__pkg__",
    "//rs/rust_canisters:__subpackages__",
])

DEPENDENCIES = [
    # Keep sorted.
    "//rs/rust_canisters/dfn_candid",
    "//rs/rust_canisters/dfn_core",
    "@crate_index//:candid",
    "@crate_index//:serde",
    "@crate_index//:serde_bytes",
]

rust_library(
    name = "dfn_http",
    srcs = glob(["src/**/*.rs"]),
    crate_name = "dfn_http",
    version = "0.9.0",
    deps = DEPENDENCIES,
)

rust_binary(
    name = "http_wasm_bin",
    srcs = ["test/wasm.rs"],
    deps = [":dfn_http"],
)

rust_doc_test(
    name = "dfn_http_doc_test",
    crate = ":dfn_http",
)
